<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>SKaP: CI_Cart Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">SKaP
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_c_i___cart.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">CI_Cart Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a568ecdb0d73d2a870f33189739922a50"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a568ecdb0d73d2a870f33189739922a50">__construct</a> ($params=array())</td></tr>
<tr class="separator:a568ecdb0d73d2a870f33189739922a50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07488e002c513013079157a9fe61a8e3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a07488e002c513013079157a9fe61a8e3">insert</a> ($items=array())</td></tr>
<tr class="separator:a07488e002c513013079157a9fe61a8e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55d27979573b7d46bdf774f247c15b07"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a55d27979573b7d46bdf774f247c15b07">_insert</a> ($items=array())</td></tr>
<tr class="separator:a55d27979573b7d46bdf774f247c15b07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adddf5d1a4f704b647f28b0322f8b64f2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#adddf5d1a4f704b647f28b0322f8b64f2">update</a> ($items=array())</td></tr>
<tr class="separator:adddf5d1a4f704b647f28b0322f8b64f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7b19afff2357d4b9e926ee2df1f3e65"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#ac7b19afff2357d4b9e926ee2df1f3e65">_update</a> ($items=array())</td></tr>
<tr class="separator:ac7b19afff2357d4b9e926ee2df1f3e65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abaa559f3e9e7f8ad933f19165fb61083"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#abaa559f3e9e7f8ad933f19165fb61083">_save_cart</a> ()</td></tr>
<tr class="separator:abaa559f3e9e7f8ad933f19165fb61083"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9efa17b570797933c7c5b0c68f743a55"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a9efa17b570797933c7c5b0c68f743a55">total</a> ()</td></tr>
<tr class="separator:a9efa17b570797933c7c5b0c68f743a55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a785be13903ee65b8936d523b2728e53a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a785be13903ee65b8936d523b2728e53a">total_items</a> ()</td></tr>
<tr class="separator:a785be13903ee65b8936d523b2728e53a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c3eeaf9ed289e55cd34926feb82eabf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a3c3eeaf9ed289e55cd34926feb82eabf">contents</a> ()</td></tr>
<tr class="separator:a3c3eeaf9ed289e55cd34926feb82eabf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabcb32751bff6bec65aa62fc152d5dde"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#aabcb32751bff6bec65aa62fc152d5dde">has_options</a> ($rowid= '')</td></tr>
<tr class="separator:aabcb32751bff6bec65aa62fc152d5dde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4ca22391c63376c2b134e5138712ace"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#ac4ca22391c63376c2b134e5138712ace">product_options</a> ($rowid= '')</td></tr>
<tr class="separator:ac4ca22391c63376c2b134e5138712ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ee4758d55d11ab91f5b7ac04b1eedc3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a0ee4758d55d11ab91f5b7ac04b1eedc3">format_number</a> ($n= '')</td></tr>
<tr class="separator:a0ee4758d55d11ab91f5b7ac04b1eedc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa118461de946085fe42989193337044a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#aa118461de946085fe42989193337044a">destroy</a> ()</td></tr>
<tr class="separator:aa118461de946085fe42989193337044a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:aef9fb0bb2a9ab37008d77ed80b7b122b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#aef9fb0bb2a9ab37008d77ed80b7b122b">$product_id_rules</a> = '\.a-z0-9_-'</td></tr>
<tr class="separator:aef9fb0bb2a9ab37008d77ed80b7b122b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdc2e791be5e676e94580a0d9ed63ebf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#afdc2e791be5e676e94580a0d9ed63ebf">$product_name_rules</a> = '\.\:\-_ a-z0-9'</td></tr>
<tr class="separator:afdc2e791be5e676e94580a0d9ed63ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0314d046ddf7fcfaec03222977427d3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#ae0314d046ddf7fcfaec03222977427d3">$CI</a></td></tr>
<tr class="separator:ae0314d046ddf7fcfaec03222977427d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93aff4174af6004d8cc7a51bf0c59632"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___cart.html#a93aff4174af6004d8cc7a51bf0c59632">$_cart_contents</a> = array()</td></tr>
<tr class="separator:a93aff4174af6004d8cc7a51bf0c59632"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a568ecdb0d73d2a870f33189739922a50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__construct </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$params</em> = <code>array()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Shopping Class Constructor</p>
<p>The constructor loads the Session class, used to store the shopping cart contents. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a55d27979573b7d46bdf774f247c15b07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_insert </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$items</em> = <code>array()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Insert</p>
<p>private </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="abaa559f3e9e7f8ad933f19165fb61083"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_save_cart </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Save the cart array to the session DB</p>
<p>private </p>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="ac7b19afff2357d4b9e926ee2df1f3e65"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">_update </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$items</em> = <code>array()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="class_update.html">Update</a> the cart</p>
<p>This function permits the quantity of a given item to be changed. Typically it is called from the "view cart" page if a user makes changes to the quantity before checkout. That array must contain the product ID and quantity for each item.</p>
<p>private </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="a3c3eeaf9ed289e55cd34926feb82eabf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">contents </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cart Contents</p>
<p>Returns the entire cart array</p>
<p>public </p>
<dl class="section return"><dt>Returns</dt><dd>array </dd></dl>

</div>
</div>
<a class="anchor" id="aa118461de946085fe42989193337044a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">destroy </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroy the cart</p>
<p>Empties the cart and kills the session</p>
<p>public </p>
<dl class="section return"><dt>Returns</dt><dd>null </dd></dl>

</div>
</div>
<a class="anchor" id="a0ee4758d55d11ab91f5b7ac04b1eedc3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">format_number </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$n</em> = <code>''</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Format Number</p>
<p>Returns the supplied number with commas and a decimal point.</p>
<p>public </p>
<dl class="section return"><dt>Returns</dt><dd>integer </dd></dl>

</div>
</div>
<a class="anchor" id="aabcb32751bff6bec65aa62fc152d5dde"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">has_options </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$rowid</em> = <code>''</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Has options</p>
<p>Returns TRUE if the rowid passed to this function correlates to an item that has options associated with it.</p>
<p>public </p>
<dl class="section return"><dt>Returns</dt><dd>array </dd></dl>

</div>
</div>
<a class="anchor" id="a07488e002c513013079157a9fe61a8e3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">insert </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$items</em> = <code>array()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Insert items into the cart and save it to the session table</p>
<p>public </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="ac4ca22391c63376c2b134e5138712ace"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">product_options </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$rowid</em> = <code>''</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Product options</p>
<p>Returns the an array of options, for a particular product row ID</p>
<p>public </p>
<dl class="section return"><dt>Returns</dt><dd>array </dd></dl>

</div>
</div>
<a class="anchor" id="a9efa17b570797933c7c5b0c68f743a55"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">total </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cart Total</p>
<p>public </p>
<dl class="section return"><dt>Returns</dt><dd>integer </dd></dl>

</div>
</div>
<a class="anchor" id="a785be13903ee65b8936d523b2728e53a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">total_items </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Total Items</p>
<p>Returns the total item count</p>
<p>public </p>
<dl class="section return"><dt>Returns</dt><dd>integer </dd></dl>

</div>
</div>
<a class="anchor" id="adddf5d1a4f704b647f28b0322f8b64f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">update </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$items</em> = <code>array()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><a class="el" href="class_update.html">Update</a> the cart</p>
<p>This function permits the quantity of a given item to be changed. Typically it is called from the "view cart" page if a user makes changes to the quantity before checkout. That array must contain the product ID and quantity for each item.</p>
<p>public </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">array</td><td></td></tr>
    <tr><td class="paramname">string</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>

</div>
</div>
<h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="a93aff4174af6004d8cc7a51bf0c59632"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$_cart_contents = array()</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ae0314d046ddf7fcfaec03222977427d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$CI</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aef9fb0bb2a9ab37008d77ed80b7b122b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$product_id_rules = '\.a-z0-9_-'</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="afdc2e791be5e676e94580a0d9ed63ebf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$product_name_rules = '\.\:\-_ a-z0-9'</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>C:/xampp/htdocs/skap/system/libraries/<a class="el" href="_cart_8php.html">Cart.php</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_c_i___cart.html">CI_Cart</a></li>
    <li class="footer">Generated on Thu Nov 29 2012 09:50:43 for SKaP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
